package com.ps.dao.setting;

import java.sql.Timestamp;
import java.util.List;
import org.hibernate.LockMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.ps.dao.BaseDaoSupport;
import com.ps.pojo.setting.Area;

/**
 * A data access object (DAO) providing persistence and search support for Area
 * entities. Transaction control of the save(), update() and delete() operations
 * can directly support Spring container-managed transactions or they can be
 * augmented to handle user-managed Spring transactions. Each of these methods
 * provides additional information for how to configure it for the desired type
 * of transaction control.
 * 
 * @see com.ps.pojo.setting.Area
 * @author MyEclipse Persistence Tools
 */

public class AreaDAO extends BaseDaoSupport<Area> {

	// property constants
	public static final String NAME = "name";

	protected void initDao() {

	}



	public List<Area> findByName(Object name) {
		return findByProperty(NAME, name);
	}


	public static AreaDAO getFromApplicationContext(ApplicationContext ctx) {
		return (AreaDAO) ctx.getBean("AreaDAO");
	}
}